3.88 \(\int \frac{1-x^2}{1-2 x^2+x^4} \, dx\)

Optimal. Leaf size=2 \[ \tanh ^{-1}(x) \]

[Out]

ArcTanh[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0020564, antiderivative size = 2, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {28, 21, 207} \[ \tanh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[(1 - x^2)/(1 - 2*x^2 + x^4),x]

[Out]

ArcTanh[x]

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1-x^2}{1-2 x^2+x^4} \, dx &=\int \frac{1-x^2}{\left (-1+x^2\right )^2} \, dx\\ &=-\int \frac{1}{-1+x^2} \, dx\\ &=\tanh ^{-1}(x)\\ \end{align*}

Mathematica [B]  time = 0.0021777, size = 19, normalized size = 9.5 \[ \frac{1}{2} \log (x+1)-\frac{1}{2} \log (1-x) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 - x^2)/(1 - 2*x^2 + x^4),x]

[Out]

-Log[1 - x]/2 + Log[1 + x]/2

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 3, normalized size = 1.5 \begin{align*}{\it Artanh} \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^2+1)/(x^4-2*x^2+1),x)

[Out]

arctanh(x)

________________________________________________________________________________________

Maxima [B]  time = 0.969496, size = 18, normalized size = 9. \begin{align*} \frac{1}{2} \, \log \left (x + 1\right ) - \frac{1}{2} \, \log \left (x - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4-2*x^2+1),x, algorithm="maxima")

[Out]

1/2*log(x + 1) - 1/2*log(x - 1)

________________________________________________________________________________________

Fricas [B]  time = 1.32515, size = 45, normalized size = 22.5 \begin{align*} \frac{1}{2} \, \log \left (x + 1\right ) - \frac{1}{2} \, \log \left (x - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4-2*x^2+1),x, algorithm="fricas")

[Out]

1/2*log(x + 1) - 1/2*log(x - 1)

________________________________________________________________________________________

Sympy [B]  time = 0.087152, size = 12, normalized size = 6. \begin{align*} - \frac{\log{\left (x - 1 \right )}}{2} + \frac{\log{\left (x + 1 \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2+1)/(x**4-2*x**2+1),x)

[Out]

-log(x - 1)/2 + log(x + 1)/2

________________________________________________________________________________________

Giac [B]  time = 1.14393, size = 20, normalized size = 10. \begin{align*} \frac{1}{2} \, \log \left ({\left | x + 1 \right |}\right ) - \frac{1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4-2*x^2+1),x, algorithm="giac")

[Out]

1/2*log(abs(x + 1)) - 1/2*log(abs(x - 1))